<script type="text/ng-template" id="modals/galleryCreate">
  <form novalidate name="createNewExplorationForm" ng-submit="create(newExplorationTitle, newExplorationCategory)" class="oppia-form">
    <div class="modal-header">
      <h3>
        Add New Exploration
        <img class="oppia-help" src="/images/help.png"
             tooltip="This form allows you to add new explorations. Enter the title of your exploration, as well as the category it should fall under in the Gallery (e.g. languages, music)."
             tooltip-placement="right"/>
      </h3>
    </div>

    <div class="modal-body">
      <div>
        Title: <input type="text" ng-model="newExplorationTitle" name="newExplorationTitle" autofocus required>
      </div>

      <div>
        Category:
        <select2-dropdown item="newExplorationCategory" choices="categoryList" placeholder="Select a category" new-choice-regex="^[A-Z a-z]+$" width="300px">
        </select2-dropdown>
      </div>

      <br>

      {% if allow_yaml_file_upload %}
        <label>
          (Optional) Upload an existing exploration (YAML file)?
          <input type="checkbox" ng-model="includeYamlFile">
        </label>
        <div ng-if="includeYamlFile">
          Upload file:
          <input id="newFileInput" type="file" file-upload="true">
        </div>
      {% endif %}
    </div>

    <div class="modal-footer">
      <input type="submit" class="btn" value="Save"
             ng-disabled="!newExplorationTitle || !newExplorationCategory"/>
      <button class="btn" ng-click="cancel()">Close</button>
    </div>
  </form>
</script>
